def use_logging(func):
    def wrapper():
        print("%s is running" % func._name_)
        return func()
    return wrapper

def foo():
    print('i am foo')
foo = use_logging(foo)
foo()


def use_logging(func):
    def wrapper():
        print("%s is running" % func._name_)
        return func()
    return wrapper

@use_logging
def foo():
    print('i am foo')
foo()